<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="utf-8"%>
<%@ page import="com.csis.system.common.WebUtil" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>服装类别信息</title>
<jsp:include page="/common.jsp" />
<script type="text/javascript">
var options={
		create:{
			url:'${pageContext.request.contextPath}/system/category/toAdd.htm',
			title:'新增类别信息',
			width:480,
			height:220
		},

		view:{
			url:'${pageContext.request.contextPath}/system/category/toView.htm',
			title:'类别详细',
			width:480,
			height:220
		},

		modify:{
			url:'${pageContext.request.contextPath}/system/category/toEdit.htm',
			title:'编辑类别信息',
			width:480,
			height:220
		},
			
		remove:{
			url:'${pageContext.request.contextPath}/system/category/toDel.htm'
		}
	};
	
</script>
</head>

<body>
	<table cellpadding="0" cellspacing="0" width="100%" height="100%">
		<tbody>
			<tr>
				<td>
					<div class="toolbar" style="background-color: #e0e0e0;">
							<a plain="true" href="javascript:void(0);"
								class="easyui-linkbutton" iconCls="icon-add" onclick="toDo(options,'C');">新增</a> 
							<a plain="true" href="javascript:void(0);"
								class="easyui-linkbutton" iconCls="icon-save" onclick="toDo(options,'M');">编辑</a>
							<a plain="true" href="javascript:void(0);"
								class="easyui-linkbutton" iconCls="icon-remove" onclick="toDo(options,'R');">删除</a>
					</div>
				</td>
			</tr>
			
			<tr>
				<td height="100%" valign="top" width="100%">
					<table id="lister" name="lister" style="width:100%;height:100%"></table>
					<div id="pager"></div>
				</td>
			</tr>
		</tbody>
	</table>
	<div id='win' class='easyui-window' title='New Window' style='width:400px;height:300px;padding:5px;' closed='true'>
	</div>
	<script>
     $(document).ready(function(){
    	 $("#lister")
			.jqGrid(
					{
						url : "${pageContext.request.contextPath }/system/category/listBy.htm",
						datatype : "json",
						colNames : [ '编号', '类别名称','父类别编号'],
						colModel : [ 
									{name : 'id',index : 'category_id',width : 200}, 
									{name : 'categoryName',index : 'category_name',width : 450},
									{name : 'categoryParent',index : 'category_parent',width : 450}
									],
						rowNum : 20,
						shrinkToFit: true,
						rowList : [ 10, 20, 30 ],
						pager : '#pager',
						sortname : 'category_id',
						viewrecords : true,
						sortorder : "asc",
						mtype: "POST",
						multiselect: true,
						height: '100%',
						width:'100%'
					});
		$("#lister").jqGrid('navGrid','#pager', {edit : false,add : false,del : false});
      });
	</script>
</body>
</html>